A virtual machine may have one or more virtual processors that are exposed to a guest operating system as single core processors. When a guest operating system runs a workload, it schedules a thread to run on one of these virtual processors. A hypervisor runs and schedules a thread that represents the virtual processor on a logical processor of a physical machine that hosts the virtual machine. The workload in the thread runs and some, hopefully useful, work is performed. The hypervisor then runs another thread on the same or a different logical processor. The hypervisor scheduler thus must determine both when and where to schedule a particular virtual processor. Proper placement of the virtual processors is a key to maintaining high levels of performance.
Proper placement of the virtual processors may include moving a thread to a logical processor on another node. For example, a hypervisor may schedule a virtual processor to run in a first NUMA (Non-Uniform Memory Architecture) node and then move it to another NUMA node. This technique ensures that workloads are run as fast as possible and any overhead due to cache misses is tolerated.
The decision to expose virtual processors as single core processors was made to make virtualization of the physical architecture of the host machine easier. For example, guest operating systems are written so that the topology is checked on boot. If the guest was moved to another host with a different topology it may operate inefficiently because the resources it expects are no longer present.
As systems that include logical processors that share various different caches become more common, it would be beneficial to configure a hypervisor to leverage these cache-sharing logical processors. Moreover, it would be beneficial to expose some sort of cache topology to a guest operating system so that the scheduler in the guest operating system can also make intelligent scheduling decisions.